/* GTKMM Plugin */

#ifndef __MENU_H_
#define __MENU_H_

#include <gtkmm/menubar.h>
#include <gtkmm/menuitem.h>

#include "gtkmm.hh"

#include "dialogs/open.hh"
#include "dialogs/messages.hh"
#include "dialogs/gototime.hh"
#include "dialogs/help.hh"
#include "dialogs/about.hh"

class MainInterface;

class VlcMenuBar : public Gtk::MenuBar
{

public:

  VlcMenuBar (MainInterface*, intf_thread_t*);
  virtual ~VlcMenuBar ();

private:

  intf_thread_t *p_intf;
  Gtk::Window *m_toplevel;

  Gtk::MenuItem* create_media_menu ();
  Gtk::MenuItem* create_playlist_menu ();
  Gtk::MenuItem* create_sd_menu ();
  Gtk::MenuItem* create_interfaces_menu ();
  Gtk::MenuItem* create_tools_menu ();
  Gtk::MenuItem* create_audio_menu ();
  Gtk::MenuItem* create_video_menu ();
  Gtk::MenuItem* create_playback_menu ();
  Gtk::MenuItem* create_help_menu ();

  Gtk::Menu* Populate( intf_thread_t *, Gtk::Menu *current,
                             std::vector<const char*>&, std::vector<int>&,
                             bool append = false );

  void open ()
  {
    OpenDialog::OpenDialog (OpenDialog::OpenFile, p_intf, m_toplevel).run ();
  }
  
  void messages ()
  {    
    new MessagesDialog::MessagesDialog (p_intf, m_toplevel);
  }

  void gototime ()
  {    
    new GotoTimeDialog::GotoTimeDialog (m_toplevel);
  }

  void help ()
  {    
    new HelpDialog::HelpDialog (m_toplevel);
  }

  void about ()
  {    
    new AboutDialog::AboutDialog (m_toplevel);
  }
  
};

#endif /* __MENU_H_ */

